package cn.jdy.plugins.entity;

import cn.jdy.common.bo.BaseEntry;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.io.Serializable;
import java.util.Date;

/**
 * 加盟留言实体类
 *
 * @author GXP
 */
@Entity
public class GuseBook extends BaseEntry  implements Serializable {
	private static final long serialVersionUID = 1996535695280105630L;
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	@Column(length = 32)
	private String id;// 主键
	private String username; // 姓名
	private String telephone; // 电话
	private String qq;// qq
	@Column(length = 20)
	private String province;// 地区 省
	@Column(length = 20)
	private String city;//地区 市
	@Column(length = 20)
	private String county;//地区  县级
	private String address; // 地址
	private String investment;// 投资金额
	@Column(length = 1000)
	private String guse_content;// 留言内容
	@Column(updatable = false)
	private String ip;
	@Column(updatable = false)
	private Integer companyId;// 企业id
	@Column(updatable = false)
	private Date gusetime;// 留言时间
	private String status;// 0 待审核  1审核通过 2 审核不通过
	private String advice;//审核意见

	@ManyToOne
	@JoinColumn(name = "companyId", insertable = false, updatable = false)
	private Company company;

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public Company getCompany() {
	  if(company == null){
      company = new Company();
    }
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getInvestment() {
		return investment;
	}

	public void setInvestment(String investment) {
		this.investment = investment;
	}

	public String getGuse_content() {
		return guse_content;
	}

	public void setGuse_content(String guse_content) {
		this.guse_content = guse_content;
	}

	public Date getGusetime() {
		return gusetime;
	}

	public void setGusetime(Date gusetime) {
		this.gusetime = gusetime;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getAdvice() {
		return advice;
	}

	public void setAdvice(String advice) {
		this.advice = advice;
	}
	
}
